Conventional image correction for correcting images such as moving images or still images allows output of clear and easy-to-see images corresponding to various scenes by performing correction according to a feature of an input image. For example, when correcting an image taken by a digital camera, if a gradation of a dark portion is difficult to see as in a backlit image, correction is performed for each pixel of the image for brightening the dark portion.
In R. C. Gonzalez, R. E. Woods, Digital Image Processing, P91 to P94, as illustrated in FIGS. 17 and 18, image correction is performed to make a histogram after image correction processing have equalized distribution. More specifically, the image correction is performed to make a histogram after image processing have equalized distribution, by dividing a histogram computed from an input image into a plurality of bins such as bins of a dark portion, an intermediate portion, and a bright portion depending on a degree of luminance, and expanding or compressing a gradation according to a ratio of the number of pixels of each bin to the total number of pixels. FIGS. 17 and 18 are diagrams for explaining histogram equalization in image correction according to a conventional technology.
In R. C. Gonzalez, R. E. Woods, Digital Image Processing, P91 to P94, after equalizing the histogram, as illustrated in FIGS. 19 and 20, a correction curve used for image correction is computed, and then image correction is performed. More specifically, image correction is performed by using a correction curve which is computed according to the ratio of the number of pixels of each bin to the total number of pixels. That is, in R. C. Gonzalez, R. E. Woods, Digital Image Processing, P91 to P94, when a ratio of the number of dark pixels to the whole image is large, as illustrated in FIG. 19, a correction amount of the dark portion is largest, and a correction direction is corrected in a brightening direction. However, in R. C. Gonzalez, R. E. Woods, Digital Image Processing, P91 to P94, when a ratio of the number of bright pixels to the whole image is large, as illustrated in FIG. 20, a correction amount of the bright portion is largest, and a correction direction is corrected in a darkening direction. FIGS. 19 and 20 are diagrams for explaining image correction processing through histogram equalization according to a conventional technology.
However, the above-mentioned conventional technology has a problem in that it is costly. Further, there is a problem in that the stability of an output image is low.
Specifically, when correcting an image in which a gradation of the dark portion is difficult to see, as in a backlit image, a control of a correction amount is required for each pixel, resulting in complicated processing and further cost. Further, when the image correction is performed, as in R. C. Gonzalez, R. E. Woods, Digital Image Processing, P91 to P94, such that the histogram after image correction has equalized distribution, a correction amount and a correction direction are not limited. Hence, some images are corrected such that the dark portion is further darkened, resulting in an unnatural gradation. Thus, the stability of an output image is low.